from tkinter import *



master = Tk()
list1=['鸡蛋','鸭蛋','鹅蛋','鸟蛋','恐龙蛋']

LB= Listbox(master)
LB.pack()

for i in list1:
    LB.insert(END,i)

Bu1=Button(master,text='删除',command= lambda x=LB : x.delete(ACTIVE))
Bu1.pack()
Bu2=Button(master,text='确定',command= lambda : print(LB.curselection()))
Bu2.pack()

mainloop()
